# -*- coding: utf-8 -*-
import requests
import ssl

# client_id 为官网获取的AK， client_secret 为官网获取的SK
host = 'https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id=xPzzjt4iXpx8Unpxy1M0wzcI&client_secret=XpUILOhYiwQ0ayNPAurFtHqEh115rm72'
head = {
    'Content-Type':'application/json; charset=UTF-8'
}
request = requests.get(host, headers = head)
content = request.text
if (content):
    print(content)